#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    m_client = new TzUdpClient;
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    PackageBody * body = new PackageBody;
    body->header.typeOfFrame = 0;
    body->header.lengthOfFrame = sizeof (PackageBody);
    body->header.startOfFrameDelimiter = 0;
    body->test1 = 1;
    body->test2 = 2;
    body->test3 = 3;

    m_client->sendData((char*)body,sizeof (PackageBody));
}
